<?php
 
class SDB
{
  private $PDOInstance = null;
  private static $instance = null;
  const DEFAULT_SQL_USER = 'root';
  const DEFAULT_SQL_HOST = 'localhost';
  const DEFAULT_SQL_PASS = 'wfusdfcf11';
  const DEFAULT_SQL_DTB = 'epilille';
  
  private function __construct()
  {
    $this->PDOInstance = new PDO('mysql:dbname='.self::DEFAULT_SQL_DTB.';host='.self::DEFAULT_SQL_HOST,self::DEFAULT_SQL_USER ,self::DEFAULT_SQL_PASS);    
  }
 
  public static function getInstance()
  {  
    if(is_null(self::$instance))
      {
	self::$instance = new SDB();
      }
    return self::$instance;
  }

  public function query($query)
  {
    return $this->PDOInstance->query($query);
  }
}

?>